from config import  config
import wandb
from datam import DataM
from model import Model
run = wandb.init(project="table-test")
table1 = wandb.Table(columns=["a", "b"], data=[["a1", "b1"], ["a2", "b2"]])
run.log({"table1": table1})

my_data = [
    [0, wandb.Image("../../data/dog&cat/0.jpg"), 0, 0],
    [1, wandb.Image("../../data/dog&cat/1.jpg"), 8, 0],
    [2, wandb.Image("../../data/dog&cat/2.jpg"), 7, 1],
    [3, wandb.Image("../../data/dog&cat/3.jpg"), 1, 1]
]

# create a wandb.Table() with corresponding columns
columns = ["id", "image", "prediction", "truth"]
table2 = wandb.Table(data=my_data, columns=columns)
run.log({"table2": table2})


# create a Table with the same columns as above,
# plus confidence scores for all labels
columns=["id", "image", "guess", "truth"]
for digit in range(10):
    columns.append("score_" + str(digit))
test_table = wandb.Table(columns=columns)

